home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / ms-0_06.lha / xms-0.06 / label.c < prev    next >
C/C++ Source or Header  |  1991-10-29  |  2KB  |  50 lines

  1. /* label.c - report underflow using an Athena Label widget */
  2.  
  3. /* (This has not been tested with X11R3 so it is currently disabled */
  4. /* on R3 systems.  It might work anyway.) */
  5.    
  6. /*  This file is part of MandelSpawn, a parallel Mandelbrot program for
  7.     the X window system.
  8.  
  9.     Copyright (C) 1990, 1991 Andreas Gustafsson
  10.  
  11.     MandelSpawn is free software; you can redistribute it and/or modify
  12.     it under the terms of the GNU General Public License, version 1,
  13.     as published by the Free Software Foundation.
  14.  
  15.     MandelSpawn is distributed in the hope that it will be useful,
  16.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.     GNU General Public License for more details.
  19.  
  20.     You should have received a copy of the GNU General Public License,
  21.     version 1, along with this program; if not, write to the Free 
  22.     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23. */
  24.  
  25. #include <stdio.h>
  26.  
  27. #include <X11/IntrinsicP.h>
  28. #include <X11/Xos.h>
  29. #include <X11/StringDefs.h>
  30.  
  31. #include <X11/Xaw/Label.h>
  32.  
  33. #include "MsP.h"    /* this is really part of the Ms widget */
  34. #include "Mama.h"
  35.  
  36. char underflow_msg[] = "Lost precision\n\nZoom out or reduce window size\n\
  37. to regain picture";
  38.  
  39. void MsCreateUnderflowLabel(w)
  40.      MsWidget w;
  41. { Arg arglist[10];
  42.   int num_args=0;
  43.   XtSetArg(arglist[num_args], XtNlabel, underflow_msg); num_args++;
  44.   XtSetArg(arglist[num_args], XtNx, 10); num_args++;
  45.   XtSetArg(arglist[num_args], XtNy, 10); num_args++;
  46.   w->ms.underflow_label =
  47.     XtCreateManagedWidget(underflow_msg, labelWidgetClass,
  48.               w, arglist, num_args);
  49. }
  50.